import {getByPid} from '@/api/category';

const actions = {
    //getByPid
    getByPid({ commit }, param) {
    //解构传值
     const { pageNum,pageSize } = param;
        return new Promise((resolve, reject) => {
            getByPid({ pageNum: pageNum,pageSize:pageSize })
                .then(response => {
                    const { data } = response;
                    resolve(data);
                })
                .catch(error => {
                    reject(error);
                });
        });
    }
};

export default {
    namespaced: true, //***
    actions
};